﻿//Authority a;
//a.User_insert("wang@127.0.0.1", "123");
//a.Auth_insert("@127.0.0.1","*");*/

/*bool bo=a.Authentication("wang@127.0.0.1", "123");
bool c = a.Auth_Judge("wang@127.0.0.1", "db", "");*/
//MyQueue<CString> q;
//q.push(L"fafag");
//CString t;  q.pop(t);
//AfxMessageBox(t);
//test
//CString to char
/*int n = 0;
//宽字节转多字节，确定要发送的字符串将占据多少个宽度的char
n = WideCharToMultiByte(CP_OEMCP, 0, str, -1, NULL, 0, 0, FALSE);
char* pBuff = new char[n];
memset(pBuff, 0, n);
//宽字节转多字节，将要发送的字符串转化为字节流
WideCharToMultiByte(CP_OEMCP, 0, str.GetBuffer(0), n, pBuff, n, 0, FALSE);
*/

CString msg;
//serverDb.DB_Drop("dbv",msg);
//serverDb.DB_Create("dbv",msg);
//serverDb.DB_Show(msg);
//serverDb.DB_Use("dbv",msg);
vector<char*>test; test.push_back("test"); test.push_back("rest_id 1 8"); test.push_back("name 4 8"); //字段名称 类型 长度 约束123
																									  //serverDb.Table_Create(test,msg);
																									  //serverDb.Table_Drop("test8",msg);
																									  //  serverDb.Table_show(msg);
																									  //serverDb.Table_desc("test8",msg);
vector<char*>field_info; field_info.push_back("name"); field_info.push_back("4"); field_info.push_back("10");
//serverDb.Table_Alter_Add("test8",field_info,msg);
//serverDb.Table_Alter_Drop("test8","description",msg);
//serverDb.Table_Alter_Modify("test8",field_info,msg);
vector<insert_model> insert; insert_model m;
m.key = "id"; m.value = "8888"; insert.push_back(m);
m.key = "name"; m.value = "wlcyuu"; insert.push_back(m);
//m.key="description";m.value="wangweijun";insert.push_back(m);
//serverDb.Table_Insert("test8",insert,msg);
vector<char*>wh; wh.push_back("id"); wh.push_back("2"); wh.push_back("8"); //wh.push_back("&");
																		   //wh.push_back("name"); wh.push_back("1"); wh.push_back("ww");
CString info;
//serverDb.Table_Select("test8",insert,wh,info,msg);
//AfxMessageBox(info);
// serverDb.Table_update("test8",insert,wh,msg); 
//serverDb.Table_Delete("test8",wh,msg);
//AfxMessageBox(msg);